package com.yufa.springcloud.controller;

import com.yufa.springcloud.feign.FeignClient01;
import com.yufa.springcloud.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class OrderConstroller {

    @Autowired
    private FeignClient01 feignClient01;

    @GetMapping(value = "/order/{id}")
    private User getOrder(@PathVariable Long id) {

        return feignClient01.getUser(id);

    }

    @GetMapping(value = "/get-user")
    private User getUser(User user) {
        return feignClient01.get_User(user);
    }

}
